Drop outstanding cairo surfaces when window is made native
authorAlexander Larsson <alexl@redhat.com>
Tue, 19 Jan 2010 15:37:42 +0000 (16:37 +0100)
committerAlexander Larsson <alexl@redhat.com>
Tue, 19 Jan 2010 15:40:59 +0000 (16:40 +0100)
Any old cairo_surface referencing the old impl window will be wrong
when we make a window native, so drop it.

This fixes bug #599511

gdk/gdkwindow.c

index b05d5fa19d032a45d3a0fffe71bab5a8bd17bb8f..4510ddd47e9b5a9206916ed22373bc778ba8f451 100644 (file)
@@ -1851,6 +1851,8 @@ gdk_window_ensure_native (GdkWindow *window)
   if (impl_window->input_window)
     disabled_extension_events = temporary_disable_extension_events (private);
 
+  gdk_window_drop_cairo_surface (private);
+
   screen = gdk_drawable_get_screen (window);
   visual = gdk_drawable_get_visual (window);